package rohyunji;

import java.util.Scanner;

public class J12_gugudan {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		
		//문제1
		System.out.println("[문제1:while문 구구단]\n단수입력해주세요");
		Scanner s1=new Scanner(System.in);
		
		int gu1=s1.nextInt();
		int j=1;
		while(j<10)
		{
			System.out.print(gu1+"*"+j+"="+(gu1*j)+" ");
			j++;
		}
		System.out.println();
		System.out.println();
		
	
		
		
		
		
		//문제 2  do while문 7단
	System.out.println("[문제2: do while문  구구단]\n단수입력해주세요");
	int gu2=s1.nextInt();
	int do1=1;
	do
	{
		System.out.print(gu2+"*"+do1+"="+(gu2*do1)+" ");
		do1++;
	}
	while(do1<10);
	System.out.println();System.out.println();
	
	
	
	
	
	
	
	
	
	//문제3
	System.out.println("[문제3: for문  구구단]\n단수입력해주세요");
	int gu3=s1.nextInt();
		for(int i=1;i<10;i++)
			System.out.print(gu3+"*"+i+"="+(gu3*i)+" ");
			


	}

}
